home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2001 May / SGI IRIX Base Documentation 2001 May.iso / usr / share / catman / p_man / cat3 / f90 / unit.z / unit
Encoding:
Text File  |  1998-10-30  |  4.1 KB  |  98 lines

  1. UNIT(3I)                                               Last changed: 1-6-98
  2.  
  3.  
  4. NNAAMMEE
  5.      UUNNIITT - Returns the status of a BBUUFFFFEERR IINN or BBUUFFFFEERR OOUUTT statement
  6.  
  7. SSYYNNOOPPSSIISS
  8.      UUNNIITT (([II==]_i))
  9.  
  10. IIMMPPLLEEMMEENNTTAATTIIOONN
  11.      UNICOS, UNICOS/mk, and IRIX systems
  12.  
  13. SSTTAANNDDAARRDDSS
  14.      CF90 and MIPSpro 7 Fortran 90 compiler extension to Fortran 90
  15.  
  16. DDEESSCCRRIIPPTTIIOONN
  17.      After execution of asynchronous I/O with a BBUUFFFFEERR IINN or BBUUFFFFEERR OOUUTT
  18.      statement, the execution sequence continues concurrently with the data
  19.      transfer.  If UUNNIITT is called in this execution sequence, the sequence
  20.      is delayed until the transfer is complete.  After the BBUUFFFFEERR IINN
  21.      operation, use UUNNIITT or LLEENNGGTTHH(3I) before using memory locations where
  22.      the data is stored.  UUNNIITT accepts the following argument:
  23.  
  24.      _i    Must be an integer or Boolean value.  Represents a unit number.
  25.  
  26.      UUNNIITT is a Fortran 90 elemental function.  The name of this intrinsic
  27.      cannot be passed as an argument.
  28.  
  29. NNOOTTEESS
  30.      On UNICOS and UNICOS/mk systems, UUNNIITT can be called as either an
  31.      external subprogram or as an intrinsic procedure.
  32.  
  33.      On IRIX systems, the BBUUFFFFEERR IINN and BBUUFFFFEERR OOUUTT statements are used for
  34.      synchronous I/O.  Asynchronous I/O is not available through BBUUFFFFEERR I/O
  35.      on IRIX systems.
  36.  
  37. RREETTUURRNN VVAALLUUEESS
  38.      When the transfer is complete, UUNNIITT returns a value of type real.  The
  39.      value is of type RREEAALL((KKIINNDD==88)) on UNICOS and UNICOS/mk systems; it is
  40.      of type RREEAALL((KKIINNDD==44)) on IRIX systems.  The returned value has one of
  41.      the following meanings:
  42.  
  43.      VVaalluuee     MMeeaanniinngg
  44.  
  45.      -2.0      A partial-record read terminated after delivering the
  46.                requested number of words or characters, but more data
  47.                remains in the record.  This status can be received only
  48.                after a BBUUFFFFEERR IINN in partial record mode.
  49.  
  50.      -1.0      Operation was completed (indicates one of the following):
  51.  
  52.                * A full- or partial-record BBUUFFFFEERR OOUUTT operation completed.
  53.  
  54.                * A full-record BBUUFFFFEERR IINN completed, transferring as much of
  55.                  the record as would fit in the space provided.
  56.  
  57.                * A partial-record BBUUFFFFEERR IINN completed, transferring as much
  58.                  data as was left in the record (no more data remains in
  59.                  the record).
  60.  
  61.                * UUNNIITT was called for an unconnected unit or for a unit on
  62.                  which no BBUUFFFFEERR IINN or BBUUFFFFEERR OOUUTT operations have been
  63.                  performed.
  64.  
  65.      0.0       An end-of-file was encountered on the previous BBUUFFFFEERR IINN
  66.                operation.  No data was transferred.
  67.  
  68.      1.0       A partially recovered error occurred on the previous BBUUFFFFEERR
  69.                IINN operation.  Use the LLEENNGGTTHH function to determine how much
  70.                data was transferred.
  71.  
  72.      2.0       An unrecovered error occurred on the last BBUUFFFFEERR IINN or
  73.                BBUUFFFFEERR OOUUTT operation.
  74.  
  75. EEXXAAMMPPLLEESS
  76.           PROGRAM TESTUNIT
  77.           DIMENSION M(200,5)
  78.           BUFFER IN(32,0) (M(1,1),M(200,5))
  79.           IF (UNIT(32) .EQ. -1.0) THEN
  80.              DO J = 1,5
  81.                DO I = 1,200
  82.                  M(I,J) = M(I,J)*2
  83.                END DO
  84.              END DO
  85.              BUFFER OUT (22,0) (M(1,1),M(200,5))
  86.              IF (UNIT(22) .NE. -1.0) CALL ABORT
  87.           ELSE
  88.              CALL ABORT
  89.           ENDIF
  90.           END
  91.  
  92. SSEEEE AALLSSOO
  93.      LLEENNGGTTHH(3I)
  94.  
  95.      _I_n_t_r_i_n_s_i_c _P_r_o_c_e_d_u_r_e_s _R_e_f_e_r_e_n_c_e _M_a_n_u_a_l, publication SR-2138, for the
  96.      printed version of this man page.
  97.  
  98.